﻿using System;
using System.Reflection;

namespace Pamela.Logic.Helpers
{
    public class BuilderInfo
    {
        public string SolutionDirectory { get; set; }
        public string SolutionInnerDirectory 
        {
            get { return string.Format(@"{0}{1}", SolutionDirectory, RootNamespace); }
            private set { } 
        }
        public string SelectedModel { get; set; }
        public string RootNamespace { get; set; }
        public string ApplicationLayerNamespace
        {
            get { return string.Format("{0}.App", this.RootNamespace); }
            private set { }
        }
        public string BusinessLayerNamespace 
        {
            get { return string.Format("{0}.Business", this.RootNamespace); }
            private set { }
        }
        public string DataLayerNamespace
        {
            get { return string.Format("{0}.Data", this.RootNamespace); }
            private set { }
        }

        public string SharedLayerNamespace
        {
            get { return string.Format("{0}.Shared", this.RootNamespace); }
            private set { }
        }
        public string ModelNamespace
        {
            get { return string.Format(@"{0}.Shared.Models", this.RootNamespace); }
            set { }
        }

        public string SharedAssemblyPath
        {
            get { return string.Format(@"{0}{1}\{1}.Shared\bin\debug\{1}.Shared.dll", this.SolutionDirectory, this.RootNamespace); }
            set { }
        }
        public string DatabaseContext
        {
            get { return "DatabaseContext"; }
            private set { }
        }

        public string ControllerDestinationFile
        {
            get { return this.SolutionInnerDirectory + "\\" + this.RootNamespace + ".App\\Controllers\\" + this.SelectedModel + "Controller.cs"; }
        }

        public string ServiceDestinationFile
        {
            get { return this.SolutionInnerDirectory + "\\" + this.RootNamespace + ".Business\\Services\\" + this.SelectedModel + "Service.cs"; }
        }
    }
}
